package com.cpucode.java.bytecode.structure;

/**
 * @author : cpucode
 * @Date : 2021/1/25
 * @Time : 11:47
 * @Github : https://github.com/CPU-Code
 * @CSDN : https://blog.csdn.net/qq_44226094
 */
public class SeniorClassAnalysis {
    private int num = 1;
    public final String info = "cpuCode";
    boolean[] counts;

    public SeniorClassAnalysis(){

    }

    public SeniorClassAnalysis(int count){
        this.counts = new boolean[count];
    }

    public String getInfo(){
        return info;
    }

    public void addNum(int n){
        num += n;
        System.out.println(num);
    }
}

/*
################## 魔数 ###############################
CA FE BA BE
################### Class 文件版本 ##################################
00 00          //major_version	主版本号(大版本)
00 34           //minor_version	副版本号(小版本)
##################### 常量池 ################################
00 30          //	constant_pool_count	常量池计数器(常量池长度)
0A 00 09 00 20
09 00 06 00 21
08 00 22
09 00 06 00 23
09 00 06 00 24
07 00 25
09 00 26 00 27
0A 00 28 00 29
07 00 2A
01 00 03 6E 75 6D
01 00 01 49
01 00 04 69 6E 66 6F
01 00 12 4C 6A 61 76 61 2F 6C 61 6E 67 2F 53 74 72 69 6E 67 3B  LcalVariableTable
01 00 0D 43 6F 6E 73 74 61 6E 74 56 61 6C 75 65
01 00 06 63 6F 75 6E 74 73 01 00 02 5B 5A 01 00 06 3C 69 6E 69 74 3E
01 00 03 28 29 56 01 00 04 43 6F 64 65
01 00 0F 4C 69 6E 65 4E 75 6D 62 65 72 54 61 62 6C 65
01 00 12 4C 6F 63 61 6C 56 61 72 69 61 62 6C 65 54 61 62 6C 65
01 00 04 74 68 69 73

// Lcom/cpucode/java/bytecode/structure/SeniorClassAnalysis;
01 00 39 4C 63 6F 6D 2F 63 70 75 63 6F 64 65 2F 6A 61 76 61 2F 62 79 74 65 63 6F 64 65 2F 73 74 72 75 63 74 75 72 65 2F 53 65 6E 69 6F 72 43 6C 61 73 73 41 6E 61 6C 79 73 69 73 3B
01 00 04 28 49 29 56
01 00 05 63 6F 75 6E 74
01 00 07 67 65 74 49 6E 66 6F
01 00 14 28 29 4C 6A 61 76 61 2F 6C 61 6E 67 2F 53 74 72 69 6E 67 3B
01 00 06 61 64 64 4E 75 6D 01 00
01 6E 01 00 0A 53 6F 75 72 63 65 46 69 6C 65
01 00 18 53 65 6E 69 6F 72 43 6C 61 73 73 41 6E 61 6C 79 73 69 73 2E 6A 61 76 61
0C 00 11 00 12 0C 00 0A 00 0B 01 00 07 61 74 67 75 69 67 75 0C 00
0C 00 0D 0C 00 0F 00 10
//com/cpucode/java/bytecode/structure/SeniorClassAnalysis
01 00 37 63 6F 6D 2F 63 70 75 63 6F 64 65 2F 6A 61 76 61 2F 62 79 74 65 63 6F 64 65 2F 73 74 72 75 63 74 75 72 65 2F 53 65 6E 69 6F 72 43 6C 61 73 73 41 6E 61 6C 79 73 69 73
07 00 2B
0C 00 2C 00 2D 07 00 2E 0C 00 2F 00 18
01 00 10 6A 61 76 61 2F 6C 61 6E 67 2F 4F 62 6A 65 63 74 01 00
10 6A 61 76 61 2F 6C 61 6E 67 2F 53 79 73 74 65 6D 01 00 03 6F 75 74
01 00 15 4C 6A 61 76 61 2F 69 6F 2F 50 72 69 6E 74 53 74 72 65 61 6D 3B
01 00 13 6A 61 76 61 2F 69 6F 2F 50 72 69 6E 74 53 74 72 65 61 6D
01 00 07 70 72 69 6E 74 6C 6E   //println

################### 访问标志 ##########################
00 21

################## 类索引、父类索引、接口索引集合 ###################
00 06
00 09
00 00

########## 字段表集合 ###########
00 03

00 02   //access_flags	访问标志
00 0A   //name_index	字段名索引
00 0B   //descriptor_index	描述符索引
00 00   //attribute_count	属性计数器

00 11   //access_flags	访问标志
00 0C
00 0D
00 01   //attribute_count	属性计数器
00 0E
00 00 00 02
00
03

00 00
00 0F
00 10
00 00

################# 方法表集合 ########################
00 04

00 01       //访问
00 11
00 12
00 01       //属性计算
00 13       //
00 00 00 46 //属性长度
00 02       //栈深度
00 01
00 00 00 10 //字节码长度
2A
B7 00 01
2A
04
B5 00 02
2A
12 03
B5 00 04
B1

00 00       //异常表
00 02       //属性集合计数器
00 14
00 00 00 12 //属性长度
00 04           //属性个数
00 00           //起始PC
00 0F           //行号
00 04           //起始PC
00 0B
00 09           //起始PC
00 0C
00 0F           //起始PC
00 11

00 15
00 00 00 0C
00 01
00 00
00 10
00 16
00 17
00 00       //序号


00 01       //访问
00 11
00 18
00 01
00 13
00 00 00 5B     //属性长度
00 02
00 02
00 00 00 17
2A
B7 00 01
2A
04
B5 00 02
2A
12 03
B5 00 04
2A
1B
BC 04
B5 00 05
B1

00 00       //异常表
00 02
00 14
00 00 00 16
00 05       //属性个数
00 00
00 13
00 04
00 0B
00 09
00 0C
00 0F
00 14
00 16
00 15

00 15
00 00 00 16
00 02   //属性个数
00 00
00 17
00 16
00 17
00 00
00 00
00 17 00 19 00 0B 00 01
00 01 00 1A 00 1B 00 01 00 13
00 00 00 2D 00 01 00 01 00 00 00 03
12 03        ldc #3 <cpuCode>
B0          //areturn

00 00 00 02 00 14 00 00
00 06 00 01 00 00 00 18 00 15 00 00 00 0C 00 01 00 00 00 03 00 16 00
17 00 00 00 01 00 1C 00 18
00 01 00 13 00 00 00 51 00 03 00 02 00 00
00 15
2A 59 B4 00 02 1B 60 B5 00 02 B2 00 07
2A
B4 00 02
B6 00 08
B1

00 00 00 02 00 14 00 00 00 0E 00
03 00 00 00 1C 00 0A 00 1D 00 14 00 1E 00 15 00 00 00 16 00 02
00 00
00 15 00 16 00 17 00 00 00 00 00 15 00 1D 00 0B 00 01 00 01

########### 属性表集合 ################
00 1E       //属性名索引
00 00 00 02 //属性长度
00 1F

分析太繁琐了, 我眼睛看花了, 呜呜呜呜
* */